<div class="main-content page-middle page-middle-padding form signup-form">
    <h2><?php echo __('Process payment') ?></h2>
    <div class="user-confirm-info">
        <p><?php
            echo __('Please verify your account information before process payment.');
        ?></p>
        
        <div class="user-info-row odd">
            <div class="label-user-info"><?php echo __('Plan') ?></div>
            <div class="user-info-value">: <?php echo $term ?> (months)</div>
        </div>
        <div class="user-info-row odd">
            <div class="label-user-info"><?php echo __('Payment Method') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['Subscription'][0]['payment_method'] ?></div>
        </div>
        <div class="user-info-row even">
            <div class="label-user-info"><?php echo __('Username') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['username'] ?></div>
        </div>
        <div class="user-info-row odd">
            <div class="label-user-info"><?php echo __('Name') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['first_name'], ' ' , $this->request->data['User']['last_name'] ?></div>
        </div>
        <div class="user-info-row even">
            <div class="label-user-info"><?php echo __('Email') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['email'] ?></div>
        </div>
        <div class="user-info-row odd">
            <div class="label-user-info"><?php echo __('Phone') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['phone'] ?></div>
        </div>
        <div class="user-info-row even">
            <div class="label-user-info"><?php echo __('House number') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['house_number'] ?></div>
        </div>
        <div class="user-info-row odd">
            <div class="label-user-info"><?php echo __('Street') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['street'] ?></div>
        </div>
        <div class="user-info-row even">
            <div class="label-user-info"><?php echo __('City/Province') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['city'] ?></div>
        </div>
        <div class="user-info-row odd">
            <div class="label-user-info"><?php echo __('Country') ?></div>
            <div class="user-info-value">: <?php echo $this->request->data['User']['country'] ?></div>
        </div>
    </div>
<?php

echo $this->Form->create(null, array('url' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'));
echo $this->Form->hidden(null, array('name' => 'cmd', 'value' => '_xclick'));
echo $this->Form->hidden(null, array('name' => 'hosted_button_id', 'value' => 'Q6YNWH47KF23N'));
echo $this->Form->hidden(null, array('name' => 'charset', 'value' => 'utf-8'));
echo $this->Form->hidden(null, array('name' => 'business', 'value' => 'sophy._1339907978_biz@gmail.com'));
echo $this->Form->hidden(null, array('name' => 'item_name', 'value' => __('Subscride Plan %d Months', $term)));
echo $this->Form->hidden(null, array('name' => 'item_number', 'value' => 'SUB'. $term . '-' . $this->request->data['User']['id'] . '-' . $this->request->data['Subscription'][0]['id']));
echo $this->Form->hidden(null, array('name' => 'amount', 'value' => $amount));

echo $this->Form->hidden(null, array('name' => 'currency_code', 'value' => 'USD'));
echo $this->Form->hidden(null, array('name' => 'return', 'value' => PAYPAL_RETURN));
echo $this->Form->hidden(null, array('name' => 'cancel_return', 'value' => PAYPAL_CANCEL_RETURN));
echo $this->Form->hidden(null, array('name' => 'notify_url', 'value' => PAYPAL_NOTIFY_URL));

echo $this->Form->hidden(null, array('name' => 'first_name', 'value' => $this->request->data['User']['first_name'] ));
echo $this->Form->hidden(null, array('name' => 'last_name', 'value' => $this->request->data['User']['last_name']));
echo $this->Form->hidden(null, array('name' => 'address1', 'value' => $this->request->data['User']['first_name']));
echo $this->Form->hidden(null, array('name' => 'city', 'value' => $this->request->data['User']['city'] ));
echo $this->Form->hidden(null, array('name' => 'country', 'value' => $this->request->data['User']['country'] ));
echo $this->Form->hidden(null, array('name' => 'night_phone_a', 'value' => $this->request->data['User']['phone'] ));
echo $this->Form->hidden(null, array('name' => 'email', 'value' => $this->request->data['User']['email']));




echo $this->Html->div('action-btn',
     $this->Html->link(__('Modify'), array('action' => 'modifyUserInfo', $this->request->data['User']['id']), array('class' => 'btn')).
     $this->Form->submit(__('Process payment'), array('class' => 'btn btn-primary btn-right', 'div' => false))
    );
echo $this->Form->end();


?>
    <!---
    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" accept-charset="utf-8"> 
        <p> 
        <input type="hidden" name="cmd" value="_xclick" /> 
        <input type="hidden" name="charset" value="utf-8" /> 
        <input type="hidden" name="hosted_button_id" value="Q6YNWH47KF23N" /> 
        
        <input type="hidden" name="business" value="sophy._1339907978_biz@gmail.com" /> 
        <input type="hidden" name="item_name" value="<?php //echo __('Subscride Plan %d', $term) ?>" />
        <input type="hidden" name="item_number" value="<?php //echo $term ?>" />
        <input type="hidden" name="amount" value="<?php //echo $amount ?>" />
        <input type="hidden" name="currency_code" value="USD" />
        <input type="hidden" name="return" value="http://kooms.info/pdt/pdt.php" /> 
        <input type="hidden" name="cancel_return" value="http://kooms.info/pdt/pdt.php" />
        <input type="hidden" name="invoice" value="inv-899009-0998"/>
        <input type="hidden" name="notify_url" value="http://kooms.info/ipn/ipn.php" />
            
        <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
        <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
        </p> 
    </form>
    -->
</div>
